﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link href="__STATIC__/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="__LIB__/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script><![endif]-->
<title>管理员安全登录</title>
<style>
*{margin: 0;padding: 0;}
#container {
	position: absolute;
	height: 100%;
	width: 100%;
}
#output {
	width: 100%;
	height: 100%;
}
.color{
	width: 120px;
	height: 20px;
	margin: 0 auto;
	position: fixed;
	left: 50%;
	margin-left: -60px;
	bottom: 20px;
}
.color li{
	float: left;
	margin: 0 5px;
	width: 20px;
	height: 20px;
	background: #ccc;
	box-shadow: 0 0 4px #FFF;
	list-style: none;
	cursor: pointer;
}
.color li:nth-child(1){
	background: #002c4a;
}
.color li:nth-child(2){
	background: #35ac03;
}
.color li:nth-child(3){
	background: #ac0908;
}
.color li:nth-child(4){
	background: #18bbff;
}
</style>
</head>
<body>
<!-- <div class="header"></div> -->
<div class="loginWraper">
	<div id="loginform" class="loginBox">
		<form class="form form-horizontal">
			<div class="row cl">
				<label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
				<div class="formControls col-xs-8">
					<input id="username" name="username" type="text" placeholder="登录账号" class="input-text size-L">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
				<div class="formControls col-xs-8">
					<input id="password" name="password" type="password" placeholder="登录密码" class="input-text size-L">
				</div>
			</div>
			<div class="row cl">
				<div class="formControls col-xs-8 col-xs-offset-3">
					<input id="code" name="code" maxlength="4" class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码'}" onclick="if(this.value=='验证码'){this.value='';}" value="验证码" style="width:150px;">
					<img id="codeimg" src="{:url('login/checkVerify')}" onclick="javascript:this.src='{:url('login/checkVerify')}?tm='+Math.random();">
					<a id="kanbuq" onclick="javascript:$('#codeimg').attr('src','{:url('login/checkVerify')}?tm='+Math.random())">看不清，换一张</a>
				</div>
			</div>
			<!-- <div class="row cl"> -->
				<!-- <div class="formControls col-xs-8 col-xs-offset-3"> -->
					<!-- <label for="online"> -->
						<!-- <input type="checkbox" name="online" id="online" value=""> -->
						<!-- 使我保持登录状态</label> -->
				<!-- </div> -->
			<!-- </div> -->
			<div class="row cl">
				<div class="formControls col-xs-8 col-xs-offset-3">
					<button id="loginBtn" name="loginBtn" type="button" class="btn btn-success radius size-L">&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;</button>
					<input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;重&nbsp;&nbsp;&nbsp;&nbsp;置&nbsp;">
				</div>
			</div>
		</form>
	</div>
</div>
<div class="footer">Copyright(C)2018 All Rights Reserved. Powered by <a style="color:#FFF;" href="http://www.bojuwang.net/" title="河南伯驹网络科技有限公司">伯驹网络</a></div>

<script type="text/javascript" src="__LIB__/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="__LIB__/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__STATIC__/h-ui.admin/vector.js"></script>

<script type="text/javascript">
$("#loginBtn").bind("click",function(){
	var username=$("#username").val();
	var password=$("#password").val();
	var code=$("#code").val();
	$.ajax({
	url:"{:url('Login/login')}",
	type:"post",
	dataType:"json",
	data:{
		'username':username,
		'password':password,
		'code':code
	},
	success:function(data){
		if(data.code==0){
			layer.msg(data.msg,{icon:6,time:3000});
			window.location.href="{:url('Index/index')}";
		}
		else{
			layer.msg(data.msg,{icon:5,time:1000});
		}
	},
	error:function(data){
		layer.msg("系统500错误，请联系管理员",{icon:2,time:2000});
	}
});
});

</script>
<script type="text/javascript">
$(function(){
	// 初始化 传入dom id
	var victor = new Victor("container", "output");
});
</script>

<div id="container">
	<div id="output"></div>
</div>
</body>
</html>